package com.example.portdemo.date.api;

import android.content.Context;
import androidx.room.Room;

import com.example.portdemo.base.AppDatabase;
import com.example.portdemo.date.dao.NewsDao;
import com.example.portdemo.date.dao.UserDao;
import com.example.portdemo.date.model.NewsEntity;
import com.example.portdemo.date.model.User;

import java.util.List;

public class DatabaseClient {
    private static AppDatabase instance;

    public static AppDatabase getInstance(Context context) {
        if (instance == null) {
            instance = Room.databaseBuilder(context.getApplicationContext(),
                    AppDatabase.class, "database-name").build();
        }

        return instance;
    }

}
